#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>

int main()
{
	int n = 10;
	int i = 1, j = 1;
	int product = 1, sum = 0;

	for (j = 1; j <= n; j++)
	{
		//for (i = 1,product=1; i <= j; i++)
		//{
		//	product *= i;
		//}
		product *= j;
		sum += product;
	}

	printf("%d", sum);

	return 0;
}